package com.hankol.community.view;

import com.baselibrary.bean.FriendListBean;

import java.util.Comparator;

public class PinyinComparator implements Comparator<FriendListBean> {

    @Override
    public int compare(FriendListBean o1, FriendListBean o2) {

        if (o1.getLetter().equals("@") || o2.getLetter().equals("#")) {
            return -1;
        } else if (o1.getLetter().equals("#") || o2.getLetter().equals("@")) {
            return 1;
        } else {
            return o1.getLetter().compareTo(o2.getLetter());
        }
    }

}